import { ResPage, ExamPaper, ResultData } from "@/api/interface/index";
import http from "@/api";

/**
 * @name 试卷列表管理模块
 */
// 获取试卷列表
export const getExamPaperList = (params: ExamPaper.ReqExamPaperParams) => {
  return http.post<ResPage<ExamPaper.ResExamPaperList>>(`/exam/paper/query`, params);
};
// 获取试卷详情
export const getExamPaperDtl = (params: { paperId: number }) => {
  return http.post<ResultData>(`/exam/paper/detail`, params);
};
// 新增试卷
export const addExamPaper = (params = {}) => {
  return http.post(`/exam/paper/add`, params);
};
// 编辑试卷
export const editExamPaper = (params: { paperId: number }) => {
  return http.post(`/exam/paper/modify`, params);
};

// 删除试卷
export const deleteExamPaper = (params: { paperId: number }) => {
  return http.post(`/exam/paper/remove`, params);
};

// 获取试卷选择列表
export const getExamPaperSelList = (params = {}) => {
  return http.post(`/exam/paper/selectionList`, params);
};
